import request from '@/utils/request'
import {encrypt} from "@/utils/jsencrypt";

export function login(data) {
  data.userPassword = encrypt(data.userPassword)
  return request({
    url: '/sys/user/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/sys/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/sys/user/logout',
    method: 'get'
  })
}
